package com.eschool.interceptor;

import java.io.UnsupportedEncodingException;

import com.jfinal.aop.Interceptor;
import com.jfinal.core.ActionInvocation;
import com.jfinal.core.Controller;

public class GlobleInterceptor implements Interceptor {

	@Override
	public void intercept(ActionInvocation ai) {
		Controller ctrl = ai.getController();
		ctrl.setAttr("base", ctrl.getRequest().getContextPath());
		ai.invoke();
	}

}
